#include <bits/stdc++.h>

#define eb emplace_back
#define ep emplace
#define fi first
#define se second
#define in read<int>()
#define lin read<ll>()
#define rep(i, x, y) for(int i = (x); i <= (y); i++)
#define per(i, x, y) for(int i = (x); i >= (y); i--)

using namespace std;

using ll = long long;
using db = double;
using pii = pair < int, int >;
using vec = vector < int >;
using veg = vector < pii >;

template < typename T > T read() {
	T x = 0; bool f = 0; char ch = getchar();
	while(!isdigit(ch)) f |= ch == '-', ch = getchar();
	while(isdigit(ch)) x = x * 10 + (ch ^ 48), ch = getchar();
	return f ? -x : x;
}

template < typename T > void chkmax(T &x, const T &y) { x = x > y ? x : y; }
template < typename T > void chkmin(T &x, const T &y) { x = x < y ? x : y; }

const int N = 2e5 + 10;

int fa[N], siz[N], col[N], tot, top, ans[N], n, m, Q, x[N], y[N];
pii stk[N];
pii gf(int x) {
	int c = 0;
	while(x != fa[x]) {
		c ^= col[x]; x = fa[x]; 
	} return { x, c };
}
void undo() {
	pii v = stk[top--];
	int x = v.fi, y = v.se; if(x == 0) return tot -= y, void();
	siz[x] -= siz[y]; fa[y] = y; col[y] = 0;
}
void merge(int x, int y) {
	pii fx = gf(x), fy = gf(y);
	if(fx.fi == fy.fi) return tot += (fx.se == fy.se), stk[++top] = { 0, fx.se == fy.se }, void();
	if(siz[fx.fi] < siz[fy.fi]) swap(fx, fy), swap(x, y);
	stk[++top] = { fx.fi, fy.fi }; siz[fx.fi] += siz[fy.fi]; fa[fy.fi] = fx.fi; col[fy.fi] = fy.se ^ fx.se ^ 1;
}
void link(int id) { merge(x[id], y[id]); }
void solve(int l, int r, int xl, int xr) {
	if(l > r) return;
	while(r > xr) ans[r] = r - 1, r--;
	if(xl == xr) {
		rep(i, l, r) {
			if(tot) ans[i] = xl;
			link(i);
		} rep(i, l, r) undo();
		return;
	} int mid = xl + xr + 1 >> 1;
	per(i, xr, mid + 1) link(i);
	int pos = r + 1;
	rep(i, l, min(r, mid + 1)) {
		if(tot) { pos = i; break; }
		link(i);
	} //cerr << "!" << pos << endl;
	rep(i, l, pos - 1) undo();
	link(mid); solve(l, pos - 1, xl, mid - 1);
	per(i, xr, mid) undo();
	rep(i, l, pos - 1) link(i); solve(pos, r, mid, xr);
	rep(i, l, pos - 1) undo();
}

int main() {
#ifndef ONLINE_JUDGE
	freopen("1.in", "r", stdin);
#endif
	n = in, m = in, Q = in;
	rep(i, 1, n) fa[i] = i, siz[i] = 1; rep(i, 1, m) x[i] = in, y[i] = in, link(i);
	if(!tot) { while(Q--) puts("NO"); return 0; }
	rep(i, 1, m) undo(); solve(1, m, 1, m);
	/* rep(i, 1, m) cerr << ans[i] << endl; */ int l, r; while(Q--) l = in, r = in, puts(ans[l] >= r ? "YES" : "NO");
	return 0;
}
